#ifndef _UART_G4_APP_H_
#define _UART_G4_APP_H_

#include "uart_app.h"
#include "SENSOR/sensor_app.h"
#include "UART/WIFI.h"

/**
 ****************************************************************************************************
 * DONE 用户变量区
 ****************************************************************************************************
 */


typedef enum G4_WIFI__ {
    G4_WIFI_MQTT,
    G4_WIFI_TCP,
    G4_WIFI_UDP
}G4_WIFIMODE;


//-----------------------------------------------	

extern uint8_t IP[];
extern uint8_t PORT[];



/**
 ****************************************************************************************************
 * DONE 用户函数区
 ****************************************************************************************************
 */

/**
 * @if Eng 
 * @brief Initializes the G4 module with specified WiFi mode 
 * @param G4_WIFI_MODE - WiFi operation mode configuration (G4_WIFIMODE enum)
 * @result G4 module is initialized and ready for operation in specified mode 
 * @else 
 * @brief 使用指定的WiFi模式初始化G4模块 
 * @param G4_WIFI_MODE - WiFi操作模式配置(G4_WIFIMODE枚举)
 * @result G4模块初始化完成并准备在指定模式下运行 
 * @endif 
 */
void G4_Init(G4_WIFIMODE G4_WIFI_MODE);

/**
 * @if Eng
 * @brief Starts the GNSS (Global Navigation Satellite System) functionality 
 * @param None
 * @result GNSS subsystem is activated and begins acquiring satellite data
 * @else
 * @brief 启动GNSS(全球导航卫星系统)功能 
 * @param 无 
 * @result GNSS子系统被激活并开始获取卫星数据 
 * @endif 
 */
void G4_GNSS_Start(void);

/**
 * @if Eng
 * @brief Handles data transmission via UART interface
 * @param huart - Pointer to UART handle structure 
 * @result Data is formatted and transmitted through specified UART interface 
 * @else 
 * @brief 通过UART接口处理数据传输
 * @param huart - 指向UART句柄结构的指针 
 * @result 数据被格式化并通过指定的UART接口传输 
 * @endif 
 */
void Data_Transfor(UART_HandleTypeDef *huart);

/**
 * @if Eng 
 * @brief Processes and disposes ADC (Analog-to-Digital Converter) data
 * @param None 
 * @result ADC data is processed and memory is cleared/released
 * @else
 * @brief 处理并处置ADC(模数转换器)数据 
 * @param 无 
 * @result ADC数据被处理且内存被清除/释放 
 * @endif 
 */
void G4_ADCDATA_Dispose(void);

/**
 * @if Eng 
 * @brief Processes and disposes GNSS data received via UART
 * @param huart - Pointer to UART handle structure receiving GNSS data 
 * @result GNSS data is parsed, processed and memory is cleared/released
 * @else
 * @brief 处理并处置通过UART接收的GNSS数据
 * @param huart - 指向接收GNSS数据的UART句柄结构的指针 
 * @result GNSS数据被解析、处理且内存被清除/释放
 * @endif 
 */
void G4_GNSSDATA_Dispose(UART_HandleTypeDef *huart);


#endif
